<link href="/css/shuaijin.css" rel="stylesheet">
<script src="/js/jquery.min.js"></script>

<div class="car">
<?php
	$key=("key");
	$curl = curl_init();
	$cid=$_GET['cid'];
	

	 curl_setopt_array($curl, array(
	 // CURLOPT_URL => "http://apis.haoservice.com/lifeservice/car/GetSeries?key=".$key,
	  CURLOPT_URL => "http://apis.haoservice.com/lifeservice/car?id=$cid&key=$key",
	  CURLOPT_RETURNTRANSFER => true,
	  CURLOPT_ENCODING => "",
	  CURLOPT_MAXREDIRS => 10,
	  CURLOPT_TIMEOUT => 30,
	  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
	  CURLOPT_CUSTOMREQUEST => "GET",
	));

	$response = curl_exec($curl);
	$obj = json_decode($response,true);
    echo "<pre>";
	print_r($obj);
	echo "</pre>";
	$err = curl_error($curl);

	curl_close($curl);


	if ($err) {
	  echo "cURL Error #:" . $err;
	  exit;
	} else { //获取到了数据
	  $obj = json_decode($response,true);
	  $result = $obj['result'];

	  foreach ($result as $key => $value) {
	  	echo "<div class=\"car_body\">";
	  	
	  //	echo $key;

	  	echo "<div class=\"car_a\">";
	  	 foreach ($value as $key2 => $value2) {
	  	 	echo $value2[img];
	  	 //	echo "<li>".$key2.":".$value2.'</li> &nbsp;';
	  	 }

	  	echo "</div>";
	  	echo "</div>";
	  }

    }


?>
</div>


<script>
/*
$(document).ready(function(){
	$(".car_a").hide();
	$(".car_show").click(function(){
		//alert("11");
	 $(".car_body .car_a").toggle();
	});
});*/
</script>










